#include "PlayerManager.h"

PlayerManager::PlayerManager()
{

}

PlayerManager::~PlayerManager(void)
{

}

VOID PlayerManager::Init()
{

}

VOID PlayerManager::Release()
{
    
}

BOOL PlayerManager::AddPlayer( DWORD dwGuid, Player *pPlayer )
{
      if(m_PlayerMap.find(dwGuid)==m_PlayerMap.end())
	  {
         m_PlayerMap.insert(PLAYER_MAP_PAIR(dwGuid,pPlayer));
		 return TRUE; 
	  }
	  else
		  return FALSE;
}

BOOL PlayerManager::RemovePlayer( DWORD dwGuid )
{ 

	if(m_PlayerMap.find(dwGuid)!=m_PlayerMap.end())
	{
		m_PlayerMap.erase(m_PlayerMap.find(dwGuid));
		return TRUE; 
	}
	else
		return FALSE;

}

BOOL PlayerManager::SetPlayerCharGuid( DWORD dwGuid, DWORD dwCharGuid )
{

	return TRUE;
}

BOOL PlayerManager::SetPlayerCharName( DWORD dwGuid, std::string strCharName )
{


	return TRUE;
}

BOOL PlayerManager::UnSetCharGuid( DWORD dwGuid )
{


	return TRUE;
}

BOOL PlayerManager::UnsetPlayerCharName( DWORD dwGuid )
{


	return TRUE;
}

Player* PlayerManager::FindPlayer( DWORD dwGuid )
{
	return (Player*)NULL;
}

Player* PlayerManager::FindPlayerByCharGuid( DWORD CharGuid )
{
	return (Player*)NULL;
}

Player* PlayerManager::FindPlayer( std::string strCharName )
{
	return (Player*)NULL;
}

VOID PlayerManager::SendToAll( BYTE *pMsg, WORD wSize )
{

}
